if [ `whoami` != "root" ]
then
   echo "please change to root"
   exit 1
fi 
ssh-keygen
#.ssh
cd ~/.ssh/
cp id_rsa `hostname`_rsa
sz -y id_rsa
cat id_rsa.pub > authorized_keys
chmod 600 authorized_keys
chmod 700 ~/.ssh
#sshd_config
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ori
cat >> /etc/ssh/sshd_config <<eof
####by `hostname`##
PermitEmptyPasswords no
GSSAPIAuthentication no
UseDNS no
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
####by `hostname`##
eof
/etc/init.d/sshd restart
